import java.util.*;
public class maxe {
public static void main(String []args){
List<Integer> arr1= Arrays.asList(12,14,3,6,8,7);
System.out.println(Collections.max(arr1));
System.out.println(Collections.min(arr1));
}
}
